Technical Q&ANW60 - Launching the Default Internet Browser (12-April-99)
Q: My code needs to launch the default Internet browser to
open my ".html" help files. I have been told that I need to assign my
".html" files a creator of A: The proper way to invoke the default browser is to use Internet Config. Not only can you use Internet Config to determine the user's default browser, butyou can also cause a URL to be launched. The following code sample illustrates this:
Example 1: Using Internet Config to Launch an URL Documentation on Internet Config itself can be found at the Internet Config web site. Mac OS 8.5 includes a new user interface, the Internet control panel, for configuring the preferred web browser. However, this control panel stores its preferences using the Internet Config API, as described above, so the code described above works equally well for Mac OS 8.5 and higher. Information about the Internet control panel can be found in the Mac OS 8.5 Technote. Even if the user is running a system prior to Mac OS 8.5, they are likely to already have Internet Config installed because many third party applications, such as Internet Explorer and Anarchie, install it. The Internet Config web site provides methods to detect the presence of Internet Config. Browser Launcher is a separate application that's only tangentially related to this problem. Apple installs this application as part of the default OS install. The application's creator code is -- Vinnie Moscaritolo Worldwide Developer Technical Support Technical Q&As | Contents Previous Question | Next Question To contact us, please use the Contact Us page. |